package com.juzi.wopu.service.impl;

import java.util.List;

import com.juzi.wopu.domain.SysProduct;
import com.juzi.wopu.query.PageList;
import com.juzi.wopu.query.SysProductQuery;
import com.juzi.wopu.service.ISysProductService;

public class SysProductServiceImpl extends BaseServiceImpl<SysProduct> implements ISysProductService{

	@Override
	public PageList find(SysProductQuery query) {
		
		return null;
	}

	@Override
	public SysProduct findLast() {
		String hql="from SysProduct order by iId desc";
		List<SysProduct> list=BaseDao.findByhql(hql);
		if(list!=null && list.size()>0){
			return list.get(0);
		}
		return null;
	}

	@Override
	public SysProduct findById(Long id) {
		String hql="from SysProduct where iId="+id;
		List<SysProduct> list=BaseDao.findByhql(hql);
		if(list!=null && list.size()>0){
			return list.get(0);
		}
		return null;
	}
}






